<!DOCTYPE html>
<html>
<!--
	作者：litongjava@qq.com
	时间：2019-03-02
	描述：js map
-->

<head>
<meta charset="UTF-8">
<title></title>
</head>

<body>
</body>
<script type="text/javascript">
var map = new Map(); //创建map
map.set("username", "litong"); //向map中添加值
map.set("passwrod", "123456");
map.forEach(function(item, key, mapObj) { //遍历map
	console.log(item, key, mapObj);
});
//取出map的中值
var username = map.get("username");
console.log(username);
</script>

</html>